﻿using System;
using System.Collections.Generic;
using ExpenseSystem.Common.BaseModel;

namespace ExpenseSystem.Model
{
    [TableName("EXP_SERVICEBONUS")]

    public class ServiceBonusModel:NormalModel
    {
        private string _code;
        private long _serviceid;
        private long _orderid;
        private long _orderdetailid;
        private long _customserviceid;
        private long _serviceorderid;
        private string _date;
        private decimal _bonus;
        private long _customerid;
        private string _note;
        private decimal _calbase;
        private decimal _calper;
        private decimal _bonusper;
        private long _productionid;
        private long _productiontypeid;
        private long _unit;
        private decimal _stockout;
        public virtual string Note
        {
            get { return _note; }
            set
            {
                if (_note == value)
                    return;
                _note = value;
                if (!PropertyUpdated.Contains("Note"))
                    PropertyUpdated.Add("Note");
            }
        }
        public virtual long CustomerId
        {
            get { return _customerid; }
            set
            {
                if (_customerid == value)
                    return;
                _customerid = value;
                if (!PropertyUpdated.Contains("CustomerId"))
                    PropertyUpdated.Add("CustomerId");
            }
        }


        public virtual long ProductionId
        {
            get { return _productionid; }
            set
            {
                if (_productionid == value)
                    return;
                _productionid = value;
                if (!PropertyUpdated.Contains("ProductionId"))
                    PropertyUpdated.Add("ProductionId");
            }
        }

        public virtual long ProductionTypeId
        {
            get { return _productiontypeid; }
            set
            {
                if (_productiontypeid == value)
                    return;
                _productiontypeid = value;
                if (!PropertyUpdated.Contains("ProductionTypeId"))
                    PropertyUpdated.Add("ProductionTypeId");
            }
        }
        public virtual string Code
        {
            get { return _code; }
            set
            {
                if (_code == value)
                    return;
                _code = value;
                if (!PropertyUpdated.Contains("Code"))
                    PropertyUpdated.Add("Code");
            }
        }
        public virtual long CustomServiceId
        {
            get { return _customserviceid; }
            set
            {
                if (_customserviceid == value)
                    return;
                _customserviceid = value;
                if (!PropertyUpdated.Contains("CustomServiceId"))
                    PropertyUpdated.Add("CustomServiceId");
            }
        }
        [Obsolete]
        public virtual long ServiceId
        {
            get { return _serviceid; }
            set
            {
                if (_serviceid == value)
                    return;
                _serviceid = value;
                if (!PropertyUpdated.Contains("ServiceId"))
                    PropertyUpdated.Add("ServiceId");
            }
        }
        public virtual long OrderId
        {
            get { return _orderid; }
            set
            {
                if (_orderid == value)
                    return;
                _orderid = value;
                if (!PropertyUpdated.Contains("OrderId"))
                    PropertyUpdated.Add("OrderId");
            }
        }
        public virtual long OrderDetailId
        {
            get { return _orderdetailid; }
            set
            {
                if (_orderdetailid == value)
                    return;
                _orderdetailid = value;
                if (!PropertyUpdated.Contains("OrderDetailId"))
                    PropertyUpdated.Add("OrderDetailId");
            }
        }

        public virtual long ServiceOrderId
        {
            get { return _serviceorderid; }
            set
            {
                if (_serviceorderid == value)
                    return;
                _serviceorderid = value;
                if (!PropertyUpdated.Contains("ServiceOrderId"))
                    PropertyUpdated.Add("ServiceOrderId");
            }
        }
        public virtual string Date
        {
            get { return _date; }
            set
            {
                if (_date == value)
                    return;
                _date = value;
                if (!PropertyUpdated.Contains("Date"))
                    PropertyUpdated.Add("Date");
            }
        }
        public virtual decimal Bonus
        {
            get { return _bonus; }
            set
            {
                if (_bonus == value)
                    return;
                _bonus = value;
                if (!PropertyUpdated.Contains("Bonus"))
                    PropertyUpdated.Add("Bonus");
            }
        }

        public virtual decimal BonusPer
        {
            get { return _bonusper; }
            set
            {
                if (_bonusper == value)
                    return;
                _bonusper = value;
                if (!PropertyUpdated.Contains("BonusPer"))
                    PropertyUpdated.Add("BonusPer");
            }
        }
        public virtual decimal CalBase
        {
            get { return _calbase; }
            set
            {
                if (_calbase == value)
                    return;
                _calbase = value;
                if (!PropertyUpdated.Contains("CalBase"))
                    PropertyUpdated.Add("CalBase");
            }
        }
        public virtual decimal CalPer
        {
            get { return _calper; }
            set
            {
                if (_calper == value)
                    return;
                _calper = value;
                if (!PropertyUpdated.Contains("CalPer"))
                    PropertyUpdated.Add("CalPer");
            }
        }
        public virtual long Unit
        {
            get { return _unit; }
            set
            {
                if (_unit == value)
                    return;
                _unit = value;
                if (!PropertyUpdated.Contains("Unit"))
                    PropertyUpdated.Add("Unit");
            }
        }
        public virtual decimal StockOut
        {
            get { return _stockout; }
            set
            {
                if (_stockout == value)
                    return;
                _stockout = value;
                if (!PropertyUpdated.Contains("StockOut"))
                    PropertyUpdated.Add("StockOut");
            }
        }
    }
}
